import request from '@/utils/request';
import downloader from '@/utils/downloader';
//下载模板
export function downloadTemplate(data) {
  return downloader({
    url: '/admin/room/download',
    method: 'get',
    params: data,
  });
}
//房间分页列表
export function roomList(data:any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/list',
    method: 'get',
    params: data,
  });
}
//新增房间
export function addRoom(data:any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/add',
    method: 'POST',
    data,
  });
}
//删除房间
export function delRoom(data:any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/delete',
    method: 'DELETE',
    params: data,
  });
}
//修改房间
export function saveRoom(data: any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/update',
    method: 'POST',
    data,
  });
}
//获取待审核列表接口
export function roomyuye(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/room/list',
    method: 'get',
    params: data,
  });
}

export function  dataAppointment(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointment/room/statistics',
    method: 'get',
    params: data,
  });
}

export function updateScheduleTime(data: any) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/updateScheduleTime',
    method: 'POST',
    data,
  });
}

export function appointmentTime(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/room/info',
    method: 'get',
    params: data,
  });
}
//模版导入房间
export function importUser(data) {
  return request({
    url: '/admin/room/importRoom',
    method: 'post',
    data,
  });
}


//模版导入房间
export function userNameList(data) {
  return request({
    url: '/admin/user/userNameList',
    method: 'get',
    params:data,
  });
}

// 上传图片
export function uploadFile(data) {
  return request({
    url: '/user/uploadFile',
    method: 'POST',
    data,
  });
} 